<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>

<style>

.uptimedata th
{
	text-align: left;
	background-color: #efefef;
	font-size: 9pt;
	font-weight: bold;
}

.uptimedata td
{
	border-bottom: 1px solid #888;
	font-size: 8pt;
	text-align: left;
}

.uptimedata td.greyline
{
	background-color: #efefef;
}

</style>

<?

		
$aHistoryData = $BigDaddyHistory->GetHistoryByCronID($_REQUEST["cronID"], 50);
?>
<p style="color: #990000"><b>Last 50 Successful Runs...</b></p>
<?
if (is_array($aHistoryData))
{
    ?>
    
		
		<table border="0" cellpadding="5" class="uptimedata">
		
		<thead>
		<th>Start</th>
        <th>End</th>
		<th>Time Elapsed (seconds)</th>
		</thead>
    <?
    $k =1;
    foreach ($aHistoryData as $aRow)
    {
        if ($k%2 == 0)
        {
            $sClass = " class = \"greyline\"";
        }
        else
        {
            $sClass = "";
        }
        ?>
        <tr>
        <td <?=$sClass;?>><?=get_time_str($aRow["last_ranstart"], 1);?></td>
        <td <?=$sClass;?>><?=get_time_str($aRow["last_ranend"], 1);?></td>
        <td <?=$sClass;?> nowrap><?=$aRow["time_elapsed"];?></td>
        </tr>
        
		
        <?
        $k++;
    }
    ?>
    </table>
    <?
}
else
{
    echo "<p>There are no historical entries recorded</p>";
}

?>
